package game.gui;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;

/**
 *
 * @author Gab'z
 */
class PanelTitlePanelBlack extends JPanel {

    private static PanelTitlePanelBlack panelTitlePanelBlack = null;
    private static JLabel label = null;
    private static JTextArea textArea = null;

    static void resetPanelTitlePanelBlack() {
        panelTitlePanelBlack = null;
        label = null;
        textArea = null;
    }

    private PanelTitlePanelBlack() {
    }

    public static PanelTitlePanelBlack getPanelTitlePanelBlack(String string) {

        panelTitlePanelBlack = new PanelTitlePanelBlack(string);

        return panelTitlePanelBlack;
    }

    private PanelTitlePanelBlack(String string) {
        System.out.println("new PanelTitlePanelBlack : " + string);
        this.setLayout(new BorderLayout());
//        this.setSize(980, 810);
//        this.setLocation(0, 0);
        // panel.setLocation(PanelJeu.getPanelJeu().getLocation());

        // this.setLocation(PanelJeu.getPanelJeu().getLocation());


//        textArea = new JTextArea(string);
//        //textArea.setColumns(400);
//        //textArea.setRows(72);
//        textArea.setFont(new Font("Arial", Font.BOLD, 72));
//        textArea.setCaretColor(Color.WHITE);



        label = new JLabel(string);
        //On écrit GROS, pour que ça se voit de loin !
        label.setFont(new Font("Arial", Font.BOLD, 72));
        label.setBackground(Color.white);
        this.add(label);
//        this.add(textArea);

         this.add(label, BorderLayout.CENTER);
       // this.add(textArea);//, BorderLayout.CENTER);
        this.setVisible(true);
    }
}